import request from '@/utils/request'
import { exportMethod } from '@/utils/utils'

export default {
  //获取列表
  getTotalList(data) {
    return request({
      url: '/checc-api/kgptKjslTawardTechtalent/getTotalList',
      method: 'post',
      data,
    })
  },
  
  //删除
  deleteList(params) {
    return request({
      url: '/checc-api/kgptKjslTawardTechtalent/delete',
      method: 'post',
      params,
    })
  },

  // 新增
  insert(data: any) {
    return request({
      url: '/checc-api/kgptKjslTawardTechtalent/insert',
      method: 'post',
      data,
    })
  },

  // 修改
  update(data: any) {
    return request({
      url: '/checc-api/kgptKjslTawardTechtalent/update',
      method: 'post',
      data,
    })
  },

  // 详情
  detailData(data: any) {
    return request({
      url: '/checc-api/kgptKjslTawardTechtalent/detail',
      method: 'post',
      data,
    })
  },

  // 提交
  submit(data: any) {
    return request({
      url: '/checc-api/kgptKjslTawardTechtalent/submit',
      method: 'post',
      data,
    })
  },

  // 撤销
  rollback(data: any) {
    return request({
      url: '/checc-api/kgptKjslTawardTechtalent/rollback',
      method: 'post',
      data,
    })
  },

  // 审核不通过
  auditNotPass(data: any) {
    return request({
      url: '/checc-api/kgptKjslTawardTechtalent/auditNotPass',
      method: 'post',
      data,
    })
  },

  // 审核通过
  auditPass(data: any) {
    return request({
      url: '/checc-api/kgptKjslTawardTechtalent/auditPass',
      method: 'post',
      data,
    })
  },

  // 导出
  export(data: any,fileName) {
    const params = {
      method:'post',
      url: '/checc-api/kgptKjslTawardTechtalent/export',
      data:data,
      fileName:fileName
    }
    return exportMethod(params)
  },


  startProcess(data: any){
    return request({
      url: '/process-api/act/run/startProcess',
      method: 'post',
      data
    })

  },

  // 流程--通过
  allowProcess(data: any){
    return request({
      url: '/process-api/act/task/completeTaskByVo',
      method: 'post',
      data
    })
  },

 // 流程--驳回
refuseProcess(data: any){
  return request({
    url: '/process-api/act/task/over',
    method: 'post',
    data
  })
}


}



